﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Bluebunnie
{
	/// <summary>
	/// Interaction logic for Window1.xaml
	/// </summary>
	public partial class DataSupplierTambah : UserControl
	{
		public DataSupplierTambah()
		{
			this.InitializeComponent();
		}

        public DataSupplierTambah(int id)
        {
            this.InitializeComponent();
        }

        private void tmblSimpan_Click(object sender, RoutedEventArgs e)
        {
            DataManager.Execute("insert into supplier set KodeSupplier=@KodeSupplier, Nama=@Nama, Alamat=@Alamat, Kota=@Kota, Propinsi=@provinsi, KodePos=@KodePos, Telephone=@Telephone, Fax=@Fax, KontakPerson=@KontakPerson, Email=@Email, Note=@Note",
                new Parameter("@KodeSupplier", txtKode.Text),
                new Parameter("@Nama", txtNama.Text),
                new Parameter("@Alamat", txtAlamat.Text),
                new Parameter("@Kota", txtKota.Text),
                new Parameter("@Provinsi", txtProvinsi.Text),
                new Parameter("@KodePos", txtKodePos.Text),
                new Parameter("@Telephone", txtTelepon.Text),
                new Parameter("@Fax", txtFax.Text),
                new Parameter("@KontakPerson", txtKontakPerson.Text),
                new Parameter("@Email", txtEmail.Text),
                new Parameter("@Note", txtNote.Text));

            
        }

        private void TmblBatal_Click(object sender, RoutedEventArgs e)
        {            
            
        }

        private void TmblTutup_Click(object sender, RoutedEventArgs e)
        {
            
        }
	}
}